-- GENERATED SPELL FOR [Haunting Phantasm] --


function spell0_6427(pUnit, Event) --@Summon Illusionary Phantasm,Self--
pUnit:FullCastSpellOnTarget(8986,pUnit)
pUnit:RegisterEvent('Sorts_6427', 2000, 1)
end

function Sorts_6427(pUnit, Event)
local choix_sorts_6427 = math.random(0, 0)
if choix_sorts_6427 == 0 then
pUnit:RegisterEvent('spell0_6427', 1, 1)
end
end

function mob6427_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6427', math.random(1500, 3000), 1)
end

function mob6427_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6427_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6427_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6427, 1, 'mob6427_Action')
RegisterUnitEvent(6427, 2, 'mob6427_Leave')
RegisterUnitEvent(6427, 3, 'mob6427_Kill')
RegisterUnitEvent(6427, 4, 'mob6427_Die')
